/*
 * @Author: 李佳晶111 11238117+lijiajing-111@user.noreply.gitee.com
 * @Date: 2023-04-07 14:24:56
 * @LastEditors: 李佳晶111 11238117+lijiajing-111@user.noreply.gitee.com
 * @LastEditTime: 2023-04-07 14:47:41
 * @FilePath: \2\shop\vue.config.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
const { defineConfig } = require("@vue/cli-service");
module.exports = defineConfig({
  transpileDependencies: true,
  lintOnSave: false,
  // 修改或新增html-webpack-plugin的值，在index.html里面能读取htmlWebpackPlugin.options.title
  chainWebpack: config =>{
    config.plugin('html').tap(args => {
        args[0].title = '鲜花后台管理系统';
        return args;
    })
},
  devServer: {
    proxy: {
      "/api": {
        target: "http://localhost:3000/", //接口域名
        changeOrigin: true, //是否跨域
        ws: true, //是否代理 websockets
        secure: true, //是否https接口
        pathRewrite: {
          //路径重置
          "^/api": "",
        },
      },
    },
  },
});
